<template>
	<div>
		<el-button type="primary" size="small" icon="el-icon-plus" @click="handleAdd">新增</el-button>
		<List />
		<Add :dataArr="menuData" />
	</div>
</template>
<script>
export default {
	components: {
		List: () => import('./components/List.vue'),
		Add: () => import('./components/Add.vue')
	},
	data() {
		return {
			menuData: []
		};
	},
	mounted() {
		this.menuData = this.$store.getters.menuData;
	},
	methods: {
		handleAdd() {
			this.$bus.$emit('showAddDialogAddMenu');
		}
	}
};
</script>
